import http from "@/http";

//默认导出的api
export default {
    //查询所有
    select: {
        name: '商品查询',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.get(this.url,params)
        }
    },
    insert: {
        name: '商品添加',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.post(this.url, params)
        }
    },
     update: {
        name: '商品修改',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.put(this.url,params)
        }
    },
    delete: {
        name: '商品下线',
        url: '/api/product',
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    }
}
